/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.letmeshare.stockkeeper;

import java.awt.Image;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.ImageIcon;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import org.letmeshare.stockkeeper.org.entities.User;
import org.letmeshare.stockkeeper.view.login.Loginview;

/**
 *
 * @author abin
 */
public class AppInit {

    private User loggedInUser;
    

    public static void init() {
        try {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
            Logger.getLogger(Loginview.class.getName()).log(Level.INFO, "System look and feel Changed", "System look and feel Changed");
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(Loginview.class.getName()).log(Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            Logger.getLogger(Loginview.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            Logger.getLogger(Loginview.class.getName()).log(Level.SEVERE, null, ex);
        } catch (UnsupportedLookAndFeelException ex) {
            Logger.getLogger(Loginview.class.getName()).log(Level.SEVERE, null, ex);
        }
    }

    public static int GetScreenWorkingWidth() {
        return java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().width;
    }

    public static int GetScreenWorkingHeight() {
        return java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment().getMaximumWindowBounds().height;
    }
    public static Image getIcon(){        
        return  new  ImageIcon("icon.png").getImage();
    }
    
}
